{% extends "base.html" %}

{% block title %}
    {{ title }}
{% endblock %}

{% block content %}
    <form class="form-horizontal" role="form" action={{ postUrl }} method="POST" >
    {% csrf_token %}

        {% for item in form %}
            {% if item.name = 'password' %}
                {{item}}
            {% else %}
                <div class="form-group">
                    <label class="control-label col-md-1">{{item.label}}</label>
                    <div class="col-md-2">
                        {{item}}
                    </div>
                    <div class="col-md-offset-1 col-md-10">
                        {{item.errors}}
                    </div>
                </div>
            {% endif %}
        {% endfor %}

        <div class="form-group">
            <div class="col-md-offset-1 col-md-10">
                <button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('确认更新吗？')">更 新</button>
                <a class="btn btn-danger btn-sm" href="/accounts/user/resetpwd/{{ object.id }}" onclick="return confirm('确认重置密码吗？？')">重置密码</a>
            <div>
        </div>
    </form>
{% endblock %}
